/**
 * Created by Android on 2017/12/15.
 */
import React, {Component} from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    Image,
    ListView,
    Button
} from 'react-native';
import  NavigationBar from '../../component/NavigationBar'
import CustomKeyPage from "./CustomKeyPage"
import { StackNavigator } from 'react-navigation';

export default class MyPage extends Component{
    constructor(props){
        super(props);

    }
    //跳转
    gotoCustomKey =() =>{
        //跳转（类似于Android中添加一个任务到任务队列）
        this.props.navigator.push({
            component : CustomKeyPage
        });
    }
    render(){
        return <View style={styles.container}>
            <NavigationBar
                titles="我的"/>
            <View style={{flexDirection:'column',alignItems:'center',marginTop:30}}>
                <Button onPress={this.gotoCustomKey} title={'自定义分类'}></Button>
            </View>
        </View>

    }

}
const SimpleApp = StackNavigator({
    MyPage: { screen: MyPage },
    CustomKeyPage: { screen: CustomKeyPage },

});
const styles = StyleSheet.create({
    container: {
        flex: 1
    }
});